package com.zl.convertd.dateStrategy;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @Description
 * @Author zl
 * @Date 2024/7/4 18:03
 */
public class NowDateTimeConverter implements DateConverterStrategy{
    @Override
    public String execute(String msg) {
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return now.format(formatter);
    }
}
